package com.chunya.nacos.client.controller;

import com.chunya.nacos.client.config.WeatherConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class WeatherController {
    @Autowired
    private WeatherConfig weatherConfig;

    @GetMapping("/weather")
    public String getWeather() {
        String weather = weatherConfig.getWeather();
        System.out.println(weather);
        return weather;
    }
}
